package coreconcurrency.local;

/**
 * create by yongli on 2022-08-27 17:39
 */

public class OnePlus {
    private static ThreadLocal<String> name= new ThreadLocal<>();

    public  void test() {
        System.out.println(name.get());
        name.set("qiang");
        System.out.println(Thread.currentThread().getName());
        if(Thread.currentThread().getId()%2==0){
            name.set("liyong");
        }
        name.set("yong");
    }
}
